﻿using DeviceFaultPushService.DeviceProcessManagement.CommunicationManagement.Models;
using DeviceFaultPushService.MessagePushService.Models;

namespace DeviceFaultPushService.DeviceProcessManagement.CommunicationManagement;

/// <summary>
/// 设备接口
/// </summary>
public interface IDeviceCommunication
{
    /// <summary>
    /// 连接状态
    /// </summary>
    public bool IsConnected { get; }
    /// <summary>
    /// 名称
    /// </summary>
    public string Name { get; }
    /// <summary>
    /// 获取联系人
    /// </summary>
    public List<ContactsModel> Contacts { get; }
    /// <summary>
    /// 获取id
    /// </summary>
    public string Id { get; }
    /// <summary>
    /// 连接设备
    /// </summary>
    public void Connect();
    /// <summary>
    /// 数据读取
    /// </summary>
    /// <param name="result"></param>
    public void Read(out List<FaultDataInformationModel> result);
    /// <summary>
    /// 关闭连接
    /// </summary>
    public void Close();
}